package com.netease.nie.service;

import com.netease.nie.dto.CreditInHomePageDto;
import com.netease.nie.dto.CreditInJFMallDto;
import com.netease.nie.dto.CreditInUserInfoDto;
import com.netease.nie.model.Credit;

/**
 * 
 * @author wwbn3695
 * @createDate July 1st,2016
 * 
 */
public interface CreditService {

	CreditInHomePageDto queryCreditInHomePageDtoByUserId(long userId);

	CreditInJFMallDto queryCreditInJFMallDtoByUserId(long userId);
	
	CreditInUserInfoDto queryCreditInUserInfoDtoByUserId(long userId);
	
	int queryUserCreditLevelByUserId(long userId);

	Long insertUserCredit(Credit credit) throws Exception;

	Credit queryUserCreditByUserId(long userId);
	
	void reloadUserCredit(long userId);
	
	int deductUserCredit(Credit credit);
	
	int addUserCredit(Credit credit);
	
	int deductAndAddUserCredit(Credit credit);
	
}
